<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" >
    <meta name="renderer" content="webkit">
    <title>测试页面</title>
    <style>
        body{margin:0;}
        #url{width: 100%;}
        #myPlayer{width: 600px;height: 400px;}
    </style>
</head>
<script>
</script>
<body>
<script src="./ezuikit.js"></script>

<textarea id="url" placeholder="这里输入直播地址"></textarea>
<button id="start">开始</button>
<br />
<video id="myPlayer" poster="" controls playsInline webkit-playsinline autoplay>

</video>

<script>
    var start = document.getElementById('start');
    var urlInput = document.getElementById('url');
    var video = document.getElementById('myPlayer');
    function startEvent(){
        var url = urlInput.value;
        video.src = url;
        var player = new EZUIPlayer('myPlayer');
        // 日志
        player.on('log', log);

        function log(str){
            var div = document.createElement('DIV');
            div.innerHTML = (new Date()).Format('yyyy-MM-dd hh:mm:ss.S') + JSON.stringify(str);
            document.body.appendChild(div);
        }


    }
    start.addEventListener('click', startEvent, false);


</script>
</body>
</html>
